<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{{title}}</title>
</head>
<body>
    <ul>
        {{each data as value index}}
            <li>{{value.content}}
                {{if value.comer_id != '' }} >>> {{value.comer_id}} {{/if}}
                <a href="/reply?com_id={{value.id}}&id={{theme_id}}">
                   {{value.id}}</a>
                <img src="{{value.out_img}}" alt="">
            </li>
        {{/each}}
    </ul>
    <button id="subscribe"  data-id="{{theme_id}}">订阅</button>
    <a href="/reply?id={{theme_id}}">发言</a>
</body>
</html>
<script src="/js/jquery.min.js"></script>
<script>
    $('#subscribe').click(function(){
        var data = {theme_id:$(this).data('id')};
    $.get("/users/subscribe", data,
        function (resData) {
            console.log(resData.message);
        });
        
    });
</script>